<?php $this->load->view('head'); ?>
<div class="main clear">
    <div class="tool">
    <form method="get" action="/index.php" id="myform">
        <input type="hidden" name="d" value="admin"/>
        <input type="hidden" name="c" value="news"/>
        <input type="hidden" name="m" value="cmd_list"/>
        <select name="tid"> 
            <option value="">--栏目选择--</option>
            <option value="85"   <?php if($tid==85){?> selected="selected"<?php }?>>深度测评</option>
            <option value="304"  <?php if($tid==304){?> selected="selected"<?php }?>>新游动态</option>
            <option value="5008" <?php if($tid==5008){?> selected="selected"<?php }?>>游戏试玩堂</option>
            <option value="5009" <?php if($tid==5009){?> selected="selected"<?php }?>>海外游戏</option>
        </select>
        <select name="mid"> 
            <option value="0">--编辑选择--</option>
            <?php foreach($editor_arr as $editor):?>
                <option value="<?php echo $editor['userid'];?>" <?php if($mid==$editor['userid']){?> selected="selected"<?php }?> ><?php echo $editor['nickname']?></option>
            <?php endforeach;?>
        </select>
        <input type="text" value="<?php if($title){ echo $title;}else{ echo "请输入文章标题"; }?>" onfocus="if (this.value == '请输入文章标题') this.value = ''" onblur="if (this.value == '') this.value = '请输入文章标题';" class="txt" name="title">

        <input type="submit"  value="搜索"/>
    </form>
    </div>
    <div class="table02">
        <table width="100%" cellspacing="0" cellpadding="0" border="0">
            <tbody>                               
                <tr>
                    <th>标题</th>
                    <th>栏目</th>
                    <th>发布时间</th>
                    <th>发布人</th>
                    <th>点击</th>
                    <th>状态</th>
                    <th>微博</th>
                    <th>操作</th>
                </tr>
                <?php if($data){?>
                <?php foreach($data as $news):?>
                <tr>
                    <td><?php echo $news['title']?></td>
                    <td><?php echo $type_arr[$news['typeid']]['typename']?></td>
                    <td><?php echo date("Y-m-d H:i:s",$news['pubdate'])?></td>
                    <td><?php echo $news['writer']?></td>
                    <td><?php echo $news['click']?></td>
                    <td><?php if($news['ismake']){echo '已发布';}else{echo '未发布';}?></td>
                    <td><?php if($news['wbid']){echo '开启';}else{echo '关闭';}?></td>
                    <td> 
                        <a href="index.php?d=admin&c=<?php if($news['temparticle'] == '265g/newgame/pic.html'){ echo 'photo';}else{echo 'news';}?>&m=cmd_edit&id=<?php echo $news['id']?>">编辑</a>|
                        <a href="index.php?d=admin&c=news&m=cmd_del&id=<?php echo $news['id']?>">删除</a>|
                        <a href="/html/create_show/<?php echo $news['id'];?>" target="_blank">生成</a>|
                        <a target="_blank" href="<?php echo get_front_url(). get_true_dir($type_arr[$news['typeid']]['typedir']).$news['id'].'.html';?>">查看</a>
                    </td>
                </tr>
                <?php endforeach;?>
                <?php }?>
            </tbody>
        </table>
    </div>
    <div class="pag2"><?php echo $multi?></div>
</div>
<?php $this->load->view('foot');?>